@extends('layouts.mobile_main')

@section('title', '推荐有奖')

@section('resources')
    @parent
    <link rel="stylesheet" href="{{ env('CSS_DOMAIN') }}/css/public.css?v={{env('CSS_VERSION')}}">
    <script src="{{ env('JS_DOMAIN') }}/js/adaptation.js?v={{env('JS_VERSION')}}"></script>
	<style>
		.recommend_content_top{width: 100%;height: 7.7rem;background: url({{env('IMAGE_DOMAIN')}}images/background_invite.png) 0 0 no-repeat;background-size: 100%;}
	</style>
@endsection

@section('content')
<div class="paysu_outer" style="background-color: #fff;">
	<header class="pay_sure oh" style="background-color: #fff;">
		    <a class="fl" href="javascript:history.go(-1);"><img class="fl" src="{{env('IMAGE_DOMAIN')}}images/back_p.png?v={{env('IMAGE_VERSION')}}" alt=""></a>
		    <span class="fl co_violet fz_48">推荐有奖</span>
	</header>
	<section class="recommend_content">
		<div class="recommend_content_top pr">
			<div class="fl tc recommend_content_info">
				<img src="{{$avatar}}" alt="">
				<p class="tc fz_40">{{$nickname}}</p>
			</div>
		    <p id="mobile_user" hidden>
                <img id="invite_btn" src="{{env('IMAGE_DOMAIN')}}images/btn.png?v={{env('IMAGE_VERSION')}}" alt="">
                <input style="width: 2.88rem;height: 2.88rem;position: absolute;bottom: 0;left: 50%;margin-left: -1.44rem;border-radius: 50%;opacity: 0;" type="button" name="" value="分享" onclick="share('{{$inviteurl}}')">
            </p>
            <a id="weixin_user" hidden href="{{$inviteurl}}"><img id="invite_btn" src="{{env('IMAGE_DOMAIN')}}images/btn.png?v={{env('IMAGE_VERSION')}}" alt=""></a>
		</div>
		<div class="act_explain pr">
			<p class="fz_44 tc">活动说明</p>
			<ol class="fz_40 co_gray">
				<li>1.您邀请的好友注册成功成为翻贝网用户后,双方均可获得翻贝券“充值无门槛,即充即翻倍”;</li>
				<li>2.邀请人每邀请成功一名好友获得一张翻贝券;</li>
				<li>3.新用户的标准为从未注册过翻贝网的手机号;</li>
				<li>4.翻贝券使用说明：充值任意金额，均可享受立即翻倍到账;</li>
				<li>5.本活动最终解释权归翻贝网所有。</li>
			</ol>
		</div>
	</section>
</div>
<!-- <div class="popup_mark">
	<div class="popup_cont oh">
		<img class="close" src="{{env('IMAGE_DOMAIN')}}images/close_p.png?v={{env('IMAGE_VERSION')}}" alt="">
		<p class="fz_48 co_violet tc yq_friend">邀请好友扫描二维码</p>
		<p id="pay_QRcode" class="fl" style="margin: 0.2rem 1.3rem;">{!! QrCode::size(250)->backgroundColor(255,255,255)->generate($inviteurl) !!}</p>
		<div class="share_place fl pr">
			<p class="fz_44 co_violet tc fenx_to">分享到</p>
			<p class="fenx tc fl">
				<img class="fl weichat" src="{{env('IMAGE_DOMAIN')}}images/weichat.png?v={{env('IMAGE_VERSION')}}" alt="">
				<span class="fz_40 fl">微信好友</span>
			</p>
			<p class="fenx tc fl">
				<img class="fl friendmoment" src="{{env('IMAGE_DOMAIN')}}images/friendmoment.png?v={{env('IMAGE_VERSION')}}" alt="">
				<span class="fz_40 fl">朋友圈</span>
			</p>
		</div>
	</div>
</div> -->
@endsection

@section("scriptResources")
    @parent
    <script>
	    window.onresize=function(){
		    pagesp();
	    }
    	//分享
	      function share(url){
	        MobileJS.share(url);
	        // console.log()
	      }
	    $(function(){
	    	if(navigator.userAgent=='FBWAndroidApp'||navigator.userAgent.indexOf('FBWiOSApp')>0){
	    		$('#mobile_user').show();
	    		$('#weixin_user').hide();
	    		$('header').hide();
	    	}else{
	    		$('#mobile_user').hide();
	    		$('#weixin_user').show();
	    		$('header').show();
	    	}
	    	// $(".popup_mark").height($(window).height())
		    var paysu_outer_h=$(window).height()-$(".pay_detail").height()-$(".double_card_text").height();
		    $(".paysu_outer").css({"min-height":paysu_outer_h-1});
		    // $("#invite_btn").click(function(){
		    // 	$(".popup_mark").show();
		    // 	$(".close").click(function(){
		    // 		$(".popup_mark").hide();
		    // 	});
	    	// })
	    	// $(".weichat").click(function(){
	    	// 	alert("分享到微信好友")
	    	// });
	    	// $(".friendmoment").click(function(){
	    	// 	alert("分享到朋友圈")
	    	// });
	    })
    </script>
@endsection